'use strict';
var Schema = require('mongoose').Schema,
    Model = require('../../../Base/server/controllers/Model');

var modelField = {};
modelField.WorkLocation = {
    type: Schema.ObjectId,
    ref: 'WorkLocation',
    Name: '工位',
    IsEmpty: false
};

modelField.Terminal = {
    type: Schema.ObjectId,
    ref: 'Terminal',
    Name: '终端设备',
    IsUnique: true,
    IsEmpty: false
};

var newModel = new Model(modelField);
newModel.addIndex({WorkLocation: 1, Terminal: 1});
newModel.create('StationTerminal', '工位终端绑定');
